home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
mac
/
media
/
dirs
/
BackUp
/
Firetower.dir
/
00001_Script_VRBehavior
next >
Wrap
Text File
|
2002-10-11
|
4KB
|
150 lines
--VR BEHAVIOR--
--Use this behavior to control the QTVR.
global Zeus, FrameTalk,ctrlobj
property SpNum, MyMem, MyName, MyHotSpot, MyWindow, MySound, counter,hack,spritenum,mysprite
on new me,
SpNum = me.spritenum
MyMem = sprite(SpNum).membernum
MyName = member(MyMem).name
sprite(SpNum).triggercallback = #HotClick
sprite(SpNum).hotSpotEnterCallBack = #HotEnter
sprite(SpNum).hotSpotExitCallBack = #HotExit
MySound = member("Click").number
counter = 0
hack=0
mysprite=sprite(spritenum)
end
--The navigates the movie when a hotspot is clicked.
on HotClick me, HotSpotID
global stupidhack
case (HotSpotID) of
141:hack=1
35 :
stupidhack=["MainMenu",0,0]
go frame "stupidhack"
return()
215 :
stupidhack=["MainMenu",0,0]
go frame "stupidhack"
return()
185 :
gotonetpage("http://www.itm-info.com/wildfire/arkansas/index.html")
17 :
stupidhack=["campfire",0,0]
go frame "stupidhack"
return()
23 :
stupidhack=["campfire",0,0]
go frame "stupidhack"
return()
30 :
stupidhack=["home",0,0]
go frame "stupidhack"
return()
5 :
stupidhack=["PrescribedBurn",0,0]
go frame "stupidhack"
return()
41:
stupidhack=["PrescribedBurn",0,0]
go frame "stupidhack"
return()
180 :
stupidhack=["WildLife",0,0]
go frame "stupidhack"
return()
174 :
stupidhack=["WildFire",0,0]
go frame "stupidhack"
return()
35 :
stupidhack=["test",0,"post"]
go frame "stupidhack"
return()
215 :
stupidhack=["test",0,"post"]
go frame "stupidhack"
return()
end case
if hack=1 then
puppetsound 1,"sec4a01"
else
sound(1).play(MySound)
end if
end
--This makes the text appear for the rollovers.
on HotEnter me, HotSpotID
case (HotSpotID) of
141: MyText = "Click the Radio for Instructions"
35 : MyText = "Click here to return to the Main Menu"
215 : MyText = "Click here to return to the Main Menu"
185 : MyText = "Click here to go to the References"
17 : MyText = "Click here to go to Campfire Safety"
23 : MyText = "Click here to go to Campfire Safety"
30 : MyText = "Click here to go to Home Wildfire Safety"
5: MyText = "Click here to go to Prescribed Burns"
41: MyText = "Click here to go to Prescribed Burns"
180 : MyText = "Click here to go to Wildlife"
174 : MyText = "Click here to go to Wildfire"
end case
member("TextBox").text = MyText
end
--This Makes the text disappear when the mouse leaves the hotspot.
on HotExit me, HotSpotID
member("TextBox").text = ""
end
--Swings the tower based on keyboard input
on keyPress me, MyKey
if MyName = "TOWER" then
if MyKey = 84 or MyKey = 125 or MyKey = 91 or MyKey = 126 then --UP/DOWN Keys
case (counter) of
2 : sprite(SpNum).swing(45, 0, 76.1296, 10) --CampFire
3 : sprite(SpNum).swing(135, 0, 76.1296, 10) --WildFire
0 : sprite(SpNum).swing(225, 0, 76.1296, 10) --WildLife/Prescribed
1 : sprite(SpNum).swing(315, 0, 76.1296, 10) --HomeSafety
end case
if counter <3 then
counter = counter + 1
else
counter = 0
end if
else if MyKey = 86 or MyKey = 123 then --LEFT Key
sprite(SpNum).pan = sprite(SpNum).pan + 5
else if MyKey = 88 or MyKey = 124 then -- RIGHT Key
sprite(SpNum).pan = sprite(SpNum).pan - 5
end if
end if
end